<template>
	<view>
		<view class="bg">
		</view>
		<view class="empty" v-if="recordList.length==0">
			<image src="../../../../static/image/empty.png" mode=""></image>
		</view>
		<view class="wrapper">
			<view class="middle" v-for="(item,index) in recordList" :key="item.order_sn">
				<view class="top">
					<view class="label1">
						{{item.name}}
					</view>
					<view class="data1">
						+{{item.money}}
					</view>
				</view>
				<view class="bottom">
					<view class="label2">
						{{item.ctime}}
					</view>
					<view class="data2">
						交易成功
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				offset:0,
				limit:10,
				recordList:[]
			}
		},
		async created() {
			this.recordList=await this.getRecordList(this.offset,this.limit)
			console.log(this.recordList)
		},
		methods: {
			async getRecordList(offset,limit){
				let token=uni.getStorageSync("token")
				const {data}=await this.$http({
					url:"member/czlog",
					header:{
						"token":token
					},
					data:{
						offset,
						limit
					}
				})
				return data.data
			}
		}
	}
</script>

<style scoped>
.bg{
	width: 100%;
	height: 100%;
	background-color: #F1F1F1;
	position: fixed;
	left: 0;
	top: 0;
	z-index: -1;
}
.empty{
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%,-50%);
}
.wrapper{
	padding: 30rpx;
	padding-top: 0;
}
.middle{
	padding: 30rpx 30rpx;
	background-color: #FFFFFF;
	height: 161rpx;
	border-radius: 10rpx;
	margin-top: 20rpx;
}
.top{
	margin-top: 10rpx;
	display: flex;
	justify-content: space-between;
}
.bottom{
	margin-top: 10rpx;
	display: flex;
	justify-content: space-between;
}
.label1{
	font-size: 30rpx;
	font-family: PingFang SC;
	font-weight: 500;
	color: #333333;
}
.data1{
	font-size: 36rpx;
	font-family: PingFang SC;
	font-weight: 400;
	color: #F5312C;
}
.label2{
	font-size: 24rpx;
	font-family: PingFang SC;
	font-weight: 400;
	color: #999999;
}
.data2{
	font-size: 24rpx;
	font-family: PingFang SC;
	font-weight: 400;
	color: #999999;
}
</style>
